﻿#region 文件信息

// FileName: SoCafeShop/Sohobloo.SoAuth.Data/DbInitializer.cs
// Author: Sohobloo
// CreateTime: 2013/06/28 20:31
// UpdateTime: 2013/06/30 3:41

#endregion

#region 引用

using System.Data.Entity;
using Sohobloo.SoAuth.Data.Migrations;
using Sohobloo.SoMcCoffee.Data;

#endregion

namespace Sohobloo.SoAuth.Data.Initialize
{
    public static class DbInitializer
    {
        #region 方法

        public static void Initialize()
        {
            //Database.SetInitializer(new DropCreateDatabaseAlways<EfDbContext>());
            //Database.SetInitializer(new DropCreateDatabaseIfModelChanges<EfDbContext>()); 
            Database.SetInitializer(new MigrateDatabaseToLatestVersion<EfDbContext, Configuration>());
        }

        #endregion 方法
    }
}